package com.gcsoftware.configs;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;

/**
 * Created by qs on 2018/3/27.
 */

@Configuration
@PropertySource(value = "file:${user.dir}/config/mail.properties",encoding = "utf-8")
public class MailConfigs {
    @Value("${mail.send.from}")
    private String mailSendFrom;

    @Value("${mail.admin}")
    private String adminMail;


    @Value("${app.pwd.set}")
    private String appPwdTemp;

    @Value("${account.pwd.set}")
    private String accountPwdTemp;

    @Value("${subject.app.pwd}")
    private String subjectAppPwd;


    @Value("${subject.user.pwd}")
    private String subjectUserPwd;

    @Value("${subject.account.reg}")
    private String subjectAccountReg;


    @Value("${subject.company.reg}")
    private String subjectCompanyReg;

    @Value("${subject.app.reg}")
    private String subjectAppReg;

    @Value("${subject.app.change}")
    private String subjectAppChange;

    @Value("${subject.app.offline}")
    private String subjectAppOffLine;

    @Value("${subject.interf.reg}")
    private String subjectInterfReg;

    @Value("${subject.interf.change}")
    private String subjectInterfChange;

    @Value("${subject.interf.offline}")
    private String subjectInterfOffLine;

    //注意！配置一个PropertySourcesPlaceholderConfigurer的Bean
    @Bean
    public static PropertySourcesPlaceholderConfigurer propertyConfigure() {
        return new PropertySourcesPlaceholderConfigurer();
    }

    public String getMailSendFrom() {
        return mailSendFrom;
    }

    public String getAppPwdTemp() {
        return appPwdTemp;
    }

    public String getAccountPwdTemp() {
        return accountPwdTemp;
    }

    public String getSubjectAppPwd() {
        return subjectAppPwd;
    }

    public String getSubjectUserPwd() {
        return subjectUserPwd;
    }

    public String getSubjectAccountReg() {
        return subjectAccountReg;
    }

    public String getSubjectAppReg() {
        return subjectAppReg;
    }

    public String getSubjectAppChange() {
        return subjectAppChange;
    }

    public String getSubjectAppOffLine() {
        return subjectAppOffLine;
    }

    public String getSubjectInterfReg() {
        return subjectInterfReg;
    }

    public String getSubjectInterfChange() {
        return subjectInterfChange;
    }

    public String getSubjectInterfOffLine() {
        return subjectInterfOffLine;
    }

    public String getAdminMail() {
        return adminMail;
    }

    public String getSubjectCompanyReg() {
        return subjectCompanyReg;
    }
}
